<template>
	<view class="category_list" >
		<view class="category_item" v-for="item in category_list_up" :key="item.id" @click="ToCreatePage(item.id)">
			<image :src="item.imageurl" ></image>
			<view>{{item.name}}</view>	
		</view>
	</view>
</template>

<script>
	export default {
		name:"CategoryList",
		data() {
			return {
				category_list_up:[{
					id:2,
					name:"拼车",
					imageurl:"/static/logo.png"
				},{
					id:3,
					name:"拼单",
					imageurl:"/static/logo.png"
				},{
					id:4,
					name:"竞赛",
					imageurl:"/static/logo.png"
				},{
					id:5,
					name:"运动",
					imageurl:"/static/logo.png"
				},{
					id:6,
					name:"娱乐",
					imageurl:"/static/logo.png"
				},{
					id:7,
					name:"自习",
					imageurl:"/static/logo.png"
				},{
					id:8,
					name:"其它",
					imageurl:"/static/logo.png"
				}]
			};
		},
		props:{
			'row_number':Number
		},
		methods:{
			ToCreatePage(pageid){
				console.log('跳转'+pageid)
				uni.navigateTo({
					url:'/pages/team_create/team_create?pageId='+pageid
				})
			}
		}
		
		
	}
</script>

<style scoped>
.category_list  {
	display: flex;
	flex-direction: row;
	justify-content:space-around;
	flex-wrap: wrap;
	margin-top: 20rpx;
}
.category_item{
	margin-top: 20rpx;
	width: 50%;
	text-align: center;
	
}
.category_list image{
	width: 60%;
	height: 200rpx;
}
</style>